<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title></title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Index/css/vip_order.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Index/css/ordered.css">
	<script type="text/javascript" src="__PUBLIC__/Index/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Index/js/vip.js"></script>
	<script type="text/javascript">
		var status="{:U('Order/status')}";
	</script>
</head>
<body>
	<div id='v_banner'>
		<ul>
			<li><a href='' class='a_on'><span class='s_on'>我的订单</span></a></li>
			<li><a href=''><span>充值缴费</span></a></li>
			<li><a href=''><span>礼品卡</span></a></li>
			<li><a href=''><span>机票</span></a></li>
			<li><a href=''><span>酒店</span></a></li>
			<li><a href=''><span>保险</span></a></li>
			<li><a href=''><span>电子书刊</span></a></li>
		</ul>
	</div>
	<div id='status'>
		<select name='order'>
			<option>最近一个月的订单</option>
			<option selected='selected'>所有订单</option>
		</select>
		<select name='status'>
			<option>所有状态</option>
			<option value='1'>等待付款</option>
			<option value='2'>支付完成</option>
		</select>
		<input class='search' type='text' name='search' value='商品名称/订单号'/>
		<input class='search_btn' type='submit' value='筛选'/>
	</div>
	<div id='v_content'>
		<table>
			<tr>
				<th width="10%">订单号</th>
				<th width="30%">商品</th>
				<th width="10%">金额（元）</th>
				<th width="15%">下单时间</th>
				<th width="10%">订单状态</th>
				<th width="20%" style='border-right:1px solid #E8E7E7;'>操作</th>
			</tr>
			<?php $time=0;$status='';$oid=0;?>
			<foreach name='result' item='v' key='k'>
				<tr><?php $price=0; ?>
					<td>{$k}</td>
					<td>
						<foreach name='v' item='value'>
							<p><img width='50px' height='50px' src="__ROOT__/Uploads/List/{$value.listpic}"/><a href="{:U('Show/index',array('id'=>$value['gid']))}" title="{$value.name}({$value.mark})" target='_top'>{$value.name}({$value.mark})</a> <br/>¥ {$value['subtotal']/$value['quantity']|number_format=###,2} × {$value.quantity}{$value.unit}<p>
								
								<?php $price=$value['total'];$time=$value['time'];$status=$value['status'];$oid=$value['oid'];?>
						</foreach>
					</td>
					<td style='font-size:14px; font-weight:600'>
						{$price|number_format=###,2}
					</td>
					<td>{$time|date='Y-m-d H:i',###}</td>
					<td style='color:#FF6600;'>{$status}</td>
					<td><switch name="status">
							<case value="待付款"><a class='zhifu' id='v_pay' style="padding-right:19px;padding-left:19px;" href="{:U('pay',array('oid'=>$oid))}">支&nbsp;付</a></case>
							<case value="已发货"><a href="{:U('sure',array('oid'=>$oid))}" class='zhifu' id="sure">确认收货</a></case>
						</switch>

						
					</td>
				</tr>
			</foreach>
		</table>	
	</div>

	<div id='buy'>
	<p><a class='sub' oid="{$_GET['id']}">确定支付</a><a>取消支付</a></p>
</div>	
<div id='wind'></div>
</body>
</html>